<?php 
	
		session_start();
		date_default_timezone_set("Asia/Shanghai");
		include('system/db/conn.php');
		
		$riqinian = $_POST['riqinian'];
		$riqiyue = $_POST['riqiyue'];
			
		/*$sid = $_POST['sid'];*/
		$zongnum=0;
		$zongprice=0;
			$sql_message="SELECT * FROM do_deal_order  where supplier_id=".$_SESSION['supplierid'];

			$result = mysql_query($sql_message);
			while($row = mysql_fetch_array($result))
			 {
			 
				if($riqiyue==substr(date("Y-m-j H:i:s",$row['create_time'])."", 5,2)&&$riqinian==substr(date("Y-m-j H:i:s",$row['create_time'])."", 0,4)){

					$zongprice+=$row['total_price'];


						$arrayzhengti = split(" ",$row['food']);
							$count_array = count($arrayzhengti);
					
					$x=0;
				for($x==0;$x<$count_array;$x++){
					$arrayFensan=split(",",$arrayzhengti[$x]);	
					
					$zongnum+=$arrayFensan[1];

				}




				}
			  

			 }
			 echo($zongprice.",".$zongnum);
			     mysql_free_result($result);
				

?>